<p class="breadcrumbs"><strong>You are here:</strong> &raquo; <a href="<?php echo $gene_uri ?>"><?php _e($gene_name) ?></a> &raquo; Sign In</p>

<h2>Member Sign In</h2>

<?php if ($errormsg): ?>
	<p class="errormessage"><?php _e($errormsg) ?></p>
<?php endif; ?>

<p>Please enter your login name and password to sign in. </p><p>If you do not have an account, please <a href="<?php echo Gene::makeLink(Gene::specialId('Register')) ?>">create one</a>.</p>

<form method="post" action="<?php echo Gene::makeLink(Gene::specialId('Login')) ?>">
<input type="hidden" name="r" value="<?php _e($return) ?>" />

<?php if ($missingusercaptcha): ?>
	<input type="hidden" name="loginname" value="<?php _e($_POST['loginname']) ?>" />
	<input type="hidden" name="loginpassword" value="<?php _e($_POST['loginpassword']) ?>" />
	<input type="hidden" name="loginremember" value="<?php echo (int)$_POST['loginremember'] ?>" />
<?php else: ?>
	<p class="fieldlabel"><label for="loginname">Login Name:</label></p>
	<p class="fielddescription">This can be <em>either</em> your e-mail address or public name.</p>
	<p class="field"><input type="text" class="required" id="loginname" name="loginname"
	<?php if ($loginname): ?>
		 value="<?php _e($loginname) ?>"
	<?php endif; ?> /></p>
	
	<p class="fieldlabel"><label for="loginpassword">Password:</label></p>
	<p class="field"><input type="password" class="required" name="loginpassword" id="loginpassword" /> <a href="<?php echo Gene::makeLink(Gene::specialId('Password')) ?>">Forgotten your password?</a></p>
	
	<p class="fieldlabel">Remember me?</p>
	<p class="field">
	<input type="radio" id="remember1" name="loginremember" value="1" /> <label for="remember1">Remember my login name and password; don't log me out.</label><br />
	<input type="radio" id="remember2" name="loginremember" value="2" checked="checked" /> <label for="remember2">Remember my login name.</label><br />
	<input type="radio" id="remember3" name="loginremember" value="3" /> <label for="remember3">Do not remember my login name or password; this is a public computer.</label>
	</p>
<?php endif; ?>

<?php if ($captcha):
	$time = time(); ?>
	<p class="fieldlabel"><label for="captchacode">Please type what you see:</label></p>
	<p class="fielddescription">If you can't read the code, <a href="#" onclick="javascript:var d=new Date();var time = d.getTime(); $('captcha').src='<?php echo Gene::makeLink(Gene::specialId('Captcha')) ?>?id=L'+time;$('captchaid').value='L'+time;return false;">request another image</a>.</p>
	<p class="field"><img id="captcha" src="<?php echo addArguments(Gene::makeLink(Gene::specialId('Captcha')), array('id' => 'L'.$time)) ?>" alt="" /></p>
	<p class="field"><input type="hidden" id="captchaid" name="captchaid" value="L<?php echo $time ?>" /><input type="text" id="captchacode" name="captchacode" class="required" style="width: 198px;" autocomplete="off" /></p>
<?php endif; ?>

<p class="formcontrols"><input type="submit" value="Sign In" class="btn_focus" /> <input type="button" value="Create an Account" class="btn_minor" onclick="javascript:window.location='<?php echo Gene::makeLink(Gene::specialId('Register')) ?>'" /></p>

</form>
